abstract class AbstractClass{
	public static final int i = 10;
	public abstract void m1();
	public abstract void m2();
}

interface IA{
	static int j = 100;
	public static final int i = 10;
	void m1();
	abstract void m2();
}

interface IB extends IA{
	void m3();
}
interface IC{
	void m4();	
}
interface ID extends IB, IC{
	/*
	void m1();
	void m2();
	void m3();
	void m4();
	*/
	void m5();
}

class ChildClass extends AbstractClass{
	public void m1(){}
	public void m2(){}
}

class IAImpl implements IA{
	public void m1(){}
	public void m2(){}
}
class IBImpl implements IB{
	public void m1(){}
	public void m2(){}
	public void m3(){}
}

class IAICImpl implements IA, IC{
	public void m1(){}
	public void m2(){}
	public void m4(){}
}

class IDImpl extends Object implements ID{
	public void m1(){}
	public void m2(){}
	public void m3(){}
	public void m4(){}
	public void m5(){}
}

class MyClass extends AbstractClass implements IC{
		public void m1(){}
		public void m2(){}
		public void m4(){}
}

abstract class IDOtherImpl implements ID{
	public void m5(){}
}

public class TestInterface{
	public static void main(String[]args){
		AbstractClass ac = new ChildClass();
	//	IA ia = new IAImpl();
		ID id = new IDImpl();
		System.out.println(id instanceof IDImpl);
		System.out.println(id instanceof ID);
		System.out.println(id instanceof IC);
		System.out.println(id instanceof IB);
		System.out.println(id instanceof IA);
		IC ic = id;
		IB ib = id;
		IA ia = id;
		ia.m1();
		ia.m2();
		//ia.m3();
		ib.m1();
		ib.m2();
		ib.m3();
		ic.m4();
		id.m1();
		id.m2();
		id.m3();
		id.m4();
		id.m5();
	}
}

